package com.andnux.android.utils;

import android.content.Context;
import android.content.SharedPreferences;
import android.widget.ImageView;

import com.andnux.android.MainApp;
import com.bumptech.glide.Glide;

public class ImageLoader {
    public static void load(String url, ImageView image) {
        Context context = image.getContext();
        SharedPreferences preferences = MainApp.getApp().getSharedPreferences("config", Context.MODE_PRIVATE);
        String host = preferences.getString("url", "");
        Glide.with(context).load("http://" + host + ":8080/design-cloud/file/download?path=" + url).into(image);
    }
}
